﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace PESWindowsPhone.Util
{
    public class RatingConverter :IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            float rating = (float)value * 100;
            return string.Format("{0:0.00}%", rating);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
